﻿class SoundManager {
	static function soundFromLibrary(id:String):ManagedSound {
		var sound:ManagedSound = new LibrarySound(id);
		return sound;
	}
	
	static function soundFromFile(file:String):ManagedSound {
		var sound:ManagedSound = new ExternalSound(file);
		return sound;
	}
	
	static var _channels:Object = {};
	
	static function channel(name:String):SoundChannel {
		if (!_channels[name]) {
			_channels[name] = new SoundChannel();
		}
		return _channels[name];
	}
}
